Your guide to Excel in First Lego League: Robot Architecture, Design, Programming and Game Strategies by Sanjeev Dwivedi & Rajeev Dwivedi

Your guide to Excel in First Lego League: Robot Architecture, Design, Programming and Game Strategies by Sanjeev Dwivedi & Rajeev Dwivedi

Author:Sanjeev Dwivedi & Rajeev Dwivedi
Language: eng
Format: azw3
Published: 2017-09-07T04:00:00+00:00


To create a myblock, it is necessary to first write a program using variables where the distance is provided as a variable (let’s call it distance) and the Moving straight ratio (let’s call it GoStrRat) is also provided as a variable. Recall that in the previous chapter, we calculated a Moving straight ratio of 18 using a sample robot. Using these variables, and the sample Moving straight ratio we can now write our program for the robot to travel 50 cm as:

Figure 113: A program to make the robot travel 50cm using variables and math block. Here we calculate the number of degrees required in the move steering block by calculating the value of distance x GoStrRatio and feeding it as the degrees in the Move steering block.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.